//
//  FaceViewController.m
//  绘制脸
//
//  Created by 胡先剑 on 16/4/6.
//  Copyright © 2016年 胡先剑. All rights reserved.
//

#import "FaceViewController.h"
#import "FaceView.h"

@interface FaceViewController ()

@property (weak, nonatomic) IBOutlet FaceView *face;

@end

@implementation FaceViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    if ([self.room isEqualToString:@"father"])
    {
        [self button:@"button1" x:160 y:320];
        [self button:@"button2" x:160 y:280];
        [self button:@"button3" x:160 y:240];
    }
    else
    {
        [self button:@"button1" x:160 y:240];
        [self button:@"button2" x:160 y:280];
        [self button:@"button3" x:160 y:320];
    }
}

- (void)button:(NSString *)button x:(int)x y:(int)y
{
    if ([self.button isEqualToString:button])
    {
        self.face.x = x;
        self.face.y = y;
    }
}

@end
